ruby char bytes ord
from
ruby
ruby char bytes ord
code:a.rb
p "A".bytes # 65
p 65.chr("UTF-8") # A
p "あ".bytes #
227, 129, 130
p "あ".ord # 12354
p
227, 129, 130
.pack('c*').force_encoding('UTF-8')